home *** CD-ROM | disk | FTP | other *** search
/ ETO Development Tools 4 / ETO Development Tools 4.iso / Essentials / MacApp Documentation / MacApp.TECH$ Archives / 1990 / Aug 90 / MacApp.Tech$ 8⁄3⁄90 / 1679-Re Key Command Objec-Aug90 < prev    next >
Encoding:
Text File  |  1991-03-06  |  1.5 KB  |  37 lines  |  [TEXT/GEOL]

  1. Item    8360525                         1-Aug-90        06:30PDT
  2.  
  3. From:   ROSENSTEIN1                     Rosenstein, Larry
  4.  
  5. To:     D4695                           Skywalker Sys, Scott Collins,PRT
  6.         MACAPP.TECH$                    MacApp Technical
  7.  
  8. Sub:    RE>Key Command Objects an
  9.  
  10. Attn: Skywalker Sys, Scott Collins,P
  11. Attn: MacApp Technical
  12. SentBy: Larry Rosenstein
  13.         Reply to:   RE>Key Command Objects and DoI
  14. A lot depends on the behavior you want with respect to Undo.  The question is
  15. whether each arrow keystroke is undoable individually, or whether a series of
  16. the same keystroke involving the same object is undoable as a unit.  (This is
  17. similar to the way typing works.)
  18.  
  19. In the former case, you create the command object in DoKeyCommand, and tell
  20. the command object to move the event one unit.  You can use the same command
  21. object as in the mouse tracking case, except that the distance to move is
  22. constant instead of defined by the mouse.
  23.  
  24. In the latter case, you need to take the same approach as TEView; you create
  25. the command object on the first keystroke and simply update it on subsequent
  26. keystrokes.  At any point if the user chooses Undo, the entire sequence of
  27. keystrokes is undone.
  28.  
  29. You can get different behaviors depending on how you determine whether to
  30. reuse or create a new command object.  (For example, what should happen if the
  31. user does 3 keystrokes, chooses Undo then Redo, and then type additional
  32. keystrokes?  Do you then undo everything or just the last set of keystrokes?)
  33.  
  34. Larry Rosenstein
  35.  
  36.  
  37.